﻿using System.Windows;
using DataInterpolator.Properties;
using DataInterpolator.ViewModel;

namespace DataInterpolator.View
{
   /// <summary>
   /// Interaction logic for MainWindow.xaml
   /// </summary>
   public partial class MainWindow : Window
   {
      /// <summary>
      /// Initializes a new instance of the MainWindow class.
      /// </summary>
      public MainWindow()
      {
         InitializeComponent();

         Loaded += (s, e) =>
         {
            WindowState = Settings.Default.MainWindowSize.State;
         };

         Closed += (s, e) =>
         {
            Settings.Default.MainWindowSize.State = WindowState;
            ViewModelLocator.Cleanup();
         };
      }
   }
}